<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body{
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow: hidden;
            background-color: #111;
        }
        h2{
            color: #fff;
            font-size: 100px;
        }
        .container{
            position: absolute;
            left: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            display: flex;
            flex-wrap: wrap;
        }
        .container .box{
            width: 50px;
            height: 50px;
            background-color: #222;
            border: 1px solid #000;
        }
        .container .box.active{
            background-color: #0f0;
            box-shadow: 0 0 10px #0f05,
                        0 0 10px #0f05,
                        0 0 10px #0f05;
            animation: animate 2s linear forwards;
        }
        @keyframes animate{
            from{
                transform: translateY(0) rotate(0deg);
            }
            to{
                transform: translateY(100vh) rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <h2>Welcome</h2>
    <div class="container"></div>

    <script>
        let container = document.querySelector('.container')
        let count = 1500;
        for(let i = 0;i < count;i++)
        {
            let box = document.createElement('div')
            box.className = 'box'
            container.appendChild(box)
        }
        let box = document.querySelectorAll('.box');
        for(let i = 0;i < box.length;i++)
        {
            let duration = Math.random() * 3
            box[i].addEventListener('mouseover',() => {
                box[i].classList.add('active')
                box[i].style.animationDuration = 1 + duration + 's'
            })
        }
    </script>
</body>
</html>